﻿var notarialActionParams= new Array();

function addSelectedNotarialActions(id) {
    if (id) { selectedIds.length = 0; selectedIds.push(id); rowChecked(id, true); }
    if (selectedIds.length == 0) { alert('Ни одно нотариальное действие не выбрано.'); return false; }
    if (self.callback == null) self.callback = opener.notarialActionSelected;
    self.callback(selectedIds.join(','));
    self.close();
    return false;
}

function rowChecked(id, check) {
    if ($('#n' + id).length > 0) {
        var a = $('#n' + id).children('a:first');
        notarialActionParams['n' + id.toString()] = { name: a.attr('title'), iscomplicated: a.attr('iscomplicated') };
    }
}